package com.ly.heart.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseVo;
import lombok.Data;
import lombok.experimental.Accessors;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 金蝶-销售退货单明细对象 erp_king_sale_refund_detail_info
 *
 * @author wutao
 * @date 2024-07-21
 */
@TableName("erp_king_sale_refund_detail_info")
@ApiModel(value = "erp_king_sale_refund_detail_info对象", description = "金蝶-销售退货单明细")
@Data
@Accessors( chain = true )
public class KingSaleRefundDetailEntity extends BaseVo {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.INPUT)
    private String id;

    /**
     * 销售退货单Id
     */
    @ApiModelProperty("销售退货单Id")
    @TableField("sale_refund_id")
    @Excel(name = "销售退货单Id")
    private String saleRefundId;

    /**
     * 物料Id
     */
    @ApiModelProperty("物料Id")
    @TableField("material_id")
    @Excel(name = "物料Id")
    private String materialId;

    /**
     * 物料编码
     */
    @ApiModelProperty("物料编码")
    @TableField("material_code")
    @Excel(name = "物料编码")
    private String materialCode;

    /**
     * 应退数量
     */
    @ApiModelProperty("应退数量")
    @TableField("should_refund_num")
    @Excel(name = "应退数量")
    private String shouldRefundNum;

    /**
     * 实退数量
     */
    @ApiModelProperty("实退数量")
    @TableField("refund_num")
    @Excel(name = "实退数量")
    private String refundNum;

    @ApiModelProperty ( "批号" )
    @TableField ( "batch_num" )
    @Excel ( name = "批号" )
    private String batchNum;
    /**
     * 销售退货单id
     */
    @ApiModelProperty("销售退货单id")
    @TableField("relation_id")
    @Excel(name = "销售退货单id")
    private String relationId;

    /**
     * 销售出库单id
     */
    @ApiModelProperty("销售出库单id")
    @TableField("source_inventory_id")
    @Excel(name = "销售出库单id")
    private String sourceInventoryId;

    /**
     * 销售出库单编码
     */
    @ApiModelProperty("销售出库单编码")
    @TableField("source_inventory_code")
    @Excel(name = "销售出库单编码")
    private String sourceInventoryCode;


    @ApiModelProperty("来源物料明细id")
    @TableField ("source_material_detail_id")
    private String sourceMaterialDetailId;

    @ApiModelProperty ( "源单类型" )
    @TableField ( "source_type" )
    @Excel ( name = "源单类型" )
    private String sourceType;

    /**
     * 规格型号
     */
    @ApiModelProperty("规格型号")
    @TableField("material_model")
    @Excel(name = "规格型号")
    private String materialModel;

    /**
     * 库存单位
     */
    @ApiModelProperty("库存单位")
    @TableField("inventory_unit")
    @Excel(name = "库存单位")
    private String inventoryUnit;

    /**
     * 是否使用
     */
    @ApiModelProperty("是否使用")
    @TableField("is_used")
    @Excel(name = "是否使用")
    private Long isUsed;

    /**
     * 是否赠品
     */
    @ApiModelProperty("是否赠品")
    @TableField("is_giveaway")
    @Excel(name = "是否赠品")
    private String isGiveaway;

    /**
     * 退货类型1:退货;2:退货补货;3:仅退款不退货
     */
    @ApiModelProperty("退货类型1:退货;2:退货补货;3:仅退款不退货")
    @TableField("refund_type")
    @Excel(name = "退货类型1:退货;2:退货补货;3:仅退款不退货")
    private String refundType;

    /**
     * 仓库id
     */
    @ApiModelProperty("仓库id")
    @TableField("warehouse_id")
    @Excel(name = "仓库id")
    private String warehouseId;

    /**
     * 仓库编码
     */
    @ApiModelProperty("仓库编码")
    @TableField("warehouse_code")
    @Excel(name = "仓库编码")
    private String warehouseCode;

    /**
     * 仓位
     */
    @ApiModelProperty("仓位")
    @TableField("warehouse_position")
    @Excel(name = "仓位")
    private String warehousePosition;

    /**
     * 库存状态
     */
    @ApiModelProperty("库存状态")
    @TableField("inventory_status")
    @Excel(name = "库存状态")
    private String inventoryStatus;

    /**
     * 退货日期
     */
    @ApiModelProperty("退货日期")
    @TableField("refund_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundDate;

    @ApiModelProperty ("行号")
    @TableField ("line_number")
    private String lineNumber;

    /**
     * 单价
     */
    @ApiModelProperty("单价")
    @TableField("price")
    @Excel(name = "单价")
    private String price;

    /**
     * 含税单价
     */
    @ApiModelProperty("含税单价")
    @TableField("tax_price")
    @Excel(name = "含税单价")
    private String taxPrice;

    /**
     * 税率
     */
    @ApiModelProperty("税率")
    @TableField("tax_rate")
    @Excel(name = "税率")
    private String taxRate;

    /**
     * 金额
     */
    @ApiModelProperty("不含税金额")
    @TableField("amount_money")
    @Excel(name = "不含税金额")
    private String amountMoney;

    @ApiModelProperty ("含税金额")
    @TableField ("tax_amount_money")
    private String taxAmountMoney;

    /**
     * 税额
     */
    @ApiModelProperty("税额")
    @TableField("tax_money")
    @Excel(name = "税额")
    private String taxMoney;

    /**
     * 价税合计
     */
    @ApiModelProperty("价税合计")
    @TableField("total_tax_price")
    @Excel(name = "价税合计")
    private String totalTaxPrice;

    /**
     * 计划跟踪号
     */
    @ApiModelProperty("计划跟踪号")
    @TableField("plan_track_num")
    @Excel(name = "计划跟踪号")
    private String planTrackNum;

    /**
     * 质量类型
     */
    @ApiModelProperty("质量类型")
    @TableField("quality_type")
    @Excel(name = "质量类型")
    private String qualityType;

    @TableField ( "create_by" )
    private String createBy;

    @TableField ( "create_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    @TableField ( "update_by" )
    private String updateBy;

    @TableField ( "update_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    @TableField("remarks")
    private String remarks;

    /**
     * todo 待定 退货单中选择的是销售出库单id
     * todo 为了不报错先暂时放着
     */
    @TableField (exist = false)
    private String saleOrderId;

    @TableField (exist = false)
    private String materialName;

    @TableField (exist = false)
    private String wareName;

    @TableField (exist = false)
    private KingSaleRefundDetailMaterialEntity kingSaleRefundDetailMaterialEntity;


    @ApiModelProperty("退货数量")
    @TableField (exist = false)
    private String totalReturnNum;

    @ApiModelProperty("退货价税合计")
    @TableField (exist = false)
    private String totalReturnTaxPrice;

}
